<template>
  <div>
    <Breadcrumb :style="{margin: '24px 0'}">
        <BreadcrumbItem>首页</BreadcrumbItem>
        <BreadcrumbItem>文章管理</BreadcrumbItem>
        <BreadcrumbItem>{{articletitle}}</BreadcrumbItem>
    </Breadcrumb>
    <Content :style="{padding: '24px', minHeight: '580px', background: '#fff'}">
        <div>
          <h2 class="head_style">{{articletitle}}</h2>
        </div>
        <div>
          <p ><b>文章标题</b></p>
          <Input  placeholder="请输入文章标题" v-model="arttitle" class="input-width"/>
        </div><br>
        <div>
          <p ><b>作&nbsp;&nbsp;&nbsp;&nbsp;者</b></p>
          <Input  placeholder="请输入文章作者" class="input-width" v-model="another"/>
        </div><br>
        <div>
          <p ><b>所属分类</b></p>
          <Select v-model="model1" class="input-width" v-if="ueState">
              <Option v-for="item in categorylist" :value="item.id" :key="item.id" >{{item.cat_name}}</Option>
          </Select>
          <!-- <Select v-model="model1" class="input-width" v-if="ueState">
              <Option v-for="item in categorylist" :value="item.id" :key="item.id" v-html="item.cat_name"></Option>
          </Select> -->
        </div><br>
        <div>
          <p ><b>所属标签</b></p>
          <Select v-model="labelstr" multiple class="input-width">
              <Option v-for="item in labellist" :value="item.id" :key="item.id">{{ item.labelname }}</Option>
          </Select>
        </div><br>

        <div>
          <p ><b>添加资源</b></p>
          <Select v-model="resourse_id" class="input-width">
              <Option v-for="item in resourcelist" :value="item.id" :key="item.id">{{ item.filename }}</Option>
          </Select>
        </div><br>

        <div>
          <p ><b>封面大图</b></p>
          <div>
            <img :src="artlogo" id="web_favicon" class="img_style">
          </div>
          <Upload action="/admin/Article/uploadArticle" name="image" :on-success="handleSuccess" :show-upload-list="false">
              <Button  icon="ios-cloud-upload-outline" id="ghost" >文件上传</Button>
          </Upload>
        </div><br>
        <div>
          <p ><b>描&nbsp;&nbsp;&nbsp;&nbsp;述</b></p>
          <Input v-model="artdesc" type="textarea" :autosize="{minRows: 2,maxRows: 10}" placeholder="请输入文章简介" style="width:1200px"></Input>
        </div><br>
        <!-- ===================  editor组件 start  ==================== -->
        <div class="editor-container">
          <p ><b>正&nbsp;&nbsp;&nbsp;&nbsp;文</b></p>
          <!-- <UE :defaultMsg=defaultMsg :config=config  :id=ue1  ref="ue" v-if="ueState"></UE> -->
          <vue-ueditor-wrap :config="myConfig" v-model="defaultMsg" v-if="ueState"></vue-ueditor-wrap>
        </div><br>
        <!-- ===================  editor组件 end    ==================== -->
        <div>
          <RadioGroup v-model="status">
              <Radio :label = "0" >已加密</Radio>
              <Radio :label = "1" >未加密</Radio>
          </RadioGroup>
        </div><br><br>
        <div>
          <Button type="primary" @click="putArticle()">提交</Button>
          <Button ><router-link to='/article'><div style="color:balck">返回</div></router-link></Button>
        </div><br><br>
    </Content>
  </div>
</template>
<style scoped>
    .info{
      border-radius: 10px;
      line-height: 20px;
      padding: 10px;
      margin: 10px;
      background-color: #ffffff;
    }
    .head_style {
      height: 50px;
    }
    p {
      line-height: 30px;
    }
    .img_style{
      height:200px;
    }
    .input-width{
      width: 700px;
    }
</style>
<script>
import articleupdate from '@/assets/js/views/article/articleupdate';

export default {
  ...articleupdate,
};
</script>

